//定义梯形
class Trapezoid {
    double upperBase, lowerBase, height;
    Trapezoid(double a, double b, double h) {
        upperBase = a;
        lowerBase = b;
        height = h;
    }
    double getArea() {
        return (upperBase + lowerBase) * height / 2;
    }
}
